import path from 'path';

const PRE_URL = 'shell-api';
const MOCK_PRE_URL = 'mock';
const baseUrl = path.join('/', PRE_URL);
const mockBaseUrl = path.join('/', MOCK_PRE_URL);

export const API = {
  BASE_URL: {
    api: baseUrl,
    mock: mockBaseUrl
  },
  GET_PRELOAD: {
    api: 'global/predata',
    mock: 'get-preload-data.json',
    action: 'global/predata'
  },
  GET_GLOBAL_MENU: {
    api: 'home/menu',
    mock: 'get-menu-data.json',
    action: 'home/menu'
  }
};

export const ACTIONSTYPES = {
  // global
  SHELL_PRELOADED: 'global/preLoadShell',
  SET_REGISTED_APP: 'global/registedApp',
  SET_CURRENT_APP: 'global/currentApp',
  GET_MENU_DATA: 'home/menu'
};
